home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pcmagwin.zip / NTWIN32.MAK < prev    next >
Text File  |  1992-11-13  |  6KB  |  176 lines

  1. # =========================================================
  2. # NTWIN32.MAK
  3. # Win32 Application NMAKE Definitions
  4. # For the Microsoft Win32 SDK for Windows NT Samples
  5. # =========================================================
  6.  
  7. # ---------------------------------------------------------
  8. # Get CPU Type - exit if CPU environment variable is not defined
  9. # ---------------------------------------------------------
  10.  
  11. # declarations for use on Intel 80x86 systems.
  12. !IF "$(CPU)" == "i386"
  13. CPUTYPE = 1
  14. DLLENTRY = @12
  15. !ENDIF
  16.  
  17. # declarations for use on self hosted MIPS systems.
  18. !IF "$(CPU)" == "MIPS"
  19. CPUTYPE = 2
  20. DLLENTRY = 
  21. !ENDIF
  22.  
  23. !IFNDEF CPUTYPE
  24. !ERROR  Must specify CPU Environment Variable ( CPU=i386 or CPU=MIPS )
  25. !ENDIF
  26.  
  27. # ---------------------------------------------------------
  28. # Target Module Dependant Compile Declarations
  29. #
  30. # Below is a table which describes which flags to use
  31. # depending on the module target:
  32. #
  33. # Module       Number of Threads Variables to C run-time
  34. # Target       Single/Multiple   Include      Library
  35. # -----------  ----------------- ------------ ----------
  36. # MODULE .EXE  Single            CVARS        LIBC.LIB
  37. # MODULE .EXE  Multiple          CVARSMT      LIBCMT.LIB
  38. # MODULE .DLL  Single            CVARSDLL     CRTDLL.LIB
  39. # MODULE .DLL  Multiple          CVARSMTDLL   CRTDLL.LIB
  40. #
  41. # Legend:
  42. # MODULE  : A Win32 Graphical User Interface module or a
  43. #           Win32 Character-Mode User Interface module
  44. # ---------------------------------------------------------
  45.  
  46. cvars      = -DWIN32
  47. cvarsmt    = $(cvars) -D_MT
  48. cvarsdll   = $(cvars) -D_DLL
  49. cvarsmtdll = $(cvars) -D_MT -D_DLL
  50.  
  51. #----------------------------------------------------------
  52. # Subsystem Dependent Compile Declarations
  53. #
  54. # When compiling for the POSIX Subsystem, psxvars should be
  55. # included.
  56. #
  57. #----------------------------------------------------------
  58.  
  59. psxvars    = -D_POSIX_
  60.  
  61. # ---------------------------------------------------------
  62. # Platform Dependent Compile Flags - must be specified after $(cc)
  63. #
  64. # Note: Debug switches are default for current release
  65. #
  66. # These switches allow for source level debugging
  67. # with WinDebug for local and global variables.
  68. #
  69. # i386 flags:
  70. #   -c   - compile without linking
  71. #   -G3  - generate 80386 instructions
  72. #   -W3  - Set warning level to level 3
  73. #   -Zi  - generate debugging information
  74. #   -Od  - disable all optimizations
  75. #
  76. # MIPS flags:
  77. #   -c   - compile without linking
  78. #   -std - produce warnings for non-ANSI standard source code.
  79. #   -g2  - produce a symbol table for debugging
  80. #   -O   - invoke the global optimizer
  81. #   -EL  - produce object modules targeted for
  82. #          "little-endian" byte ordering
  83. # ---------------------------------------------------------
  84.  
  85. # declarations for use on Intel 80x86 systems.
  86. !IF "$(CPU)" == "i386"
  87. cdebug   = -Zi -Od
  88. cflags   = -c -G3 -W3 -Di386=1
  89. cvtdebug =
  90. !ENDIF
  91.  
  92. # declarations for use on self hosted MIPS systems.
  93. !IF "$(CPU)" == "MIPS"
  94. cdebug   = -g2
  95. cflags   = -c -std -o $(*B).obj -EL -DMIPS=1
  96. cvtdebug = -c
  97. !ENDIF
  98.  
  99. # ---------------------------------------------------------
  100. # Target Module Dependent Link Flags - must be specified after $(link)
  101. #
  102. # Note: Debug switches are default for current release
  103. #
  104. # These switches allow for source level debugging
  105. # with WinDebug for local and global variables.
  106. # ---------------------------------------------------------
  107.  
  108. linkdebug = -debug:full -debugtype:cv
  109. linknodebug = -debug:none
  110. conflags  = -subsystem:console -entry:mainCRTStartup
  111. guiflags  = -subsystem:windows -entry:WinMainCRTStartup
  112. psxflags  = -subsystem:posix -entry:__PosixProcessStartup
  113.  
  114. # ---------------------------------------------------------
  115. # Platform Dependent Binaries Declarations
  116. #
  117. # Note: Debug switches are default for current release
  118. #
  119. # These switches allow for source level debugging
  120. # with WinDebug for local and global variables.
  121. # ---------------------------------------------------------
  122.  
  123. # declarations for use on Intel 80x86 systems.
  124. !IF "$(CPU)" == "i386"
  125. cc     = cl386
  126. cvtobj = REM MIPS-only conversion:
  127. !ENDIF
  128.  
  129. # declarations for use on self hosted MIPS systems.
  130. !IF "$(CPU)" == "MIPS"
  131. cc     = cc
  132. cvtobj = mip2coff 
  133. !ENDIF
  134.  
  135. link = link 
  136.  
  137. # ---------------------------------------------------------
  138. # Target Module Dependent Link Libraries
  139. #
  140. # Below is a table which describes which libraries to use
  141. # depending on the module target:
  142. #
  143. # Module       Number of Threads Variables to C run-time
  144. # Target       Single/Multiple   Include      Library
  145. # -----------  ----------------- ------------ ----------
  146. # CONSOLE.EXE  Single            CONLIBS      LIBC.LIB
  147. # CONSOLE.EXE  Multiple          CONLIBSMT    LIBCMT.LIB
  148. # CONSOLE.DLL  Either            CONLIBSDLL   CRTDLL.LIB
  149. # WINDOWS.EXE  Single            GUILIBS      LIBC.LIB
  150. # WINDOWS.EXE  Multiple          GUILIBSMT    LIBCMT.LIB
  151. # WINDOWS.DLL  Either            GUILIBSDLL   CRTDLL.LIB
  152. # POSIX.EXE    Single            PSXLIBS      LIBCPSX.LIB
  153. #
  154. # Legend:
  155. # WINDOWS : A Win32 Graphical User Interface module
  156. # CONSOLE : A Win32 Character-Mode User Interface module
  157. # POSIX   : A Posix Subsystem Character-Mode User Interface module
  158. # ---------------------------------------------------------
  159.  
  160. conlibs    = libc.lib ntdll.lib kernel32.lib
  161.  
  162. conlibsmt  = libcmt.lib ntdll.lib kernel32.lib
  163.  
  164. conlibsdll = crtdll.lib ntdll.lib kernel32.lib
  165.  
  166. guilibs    = libc.lib ntdll.lib kernel32.lib user32.lib gdi32.lib \
  167.              winspool.lib comdlg32.lib
  168.  
  169. guilibsmt  = libcmt.lib ntdll.lib kernel32.lib user32.lib gdi32.lib \
  170.              winspool.lib comdlg32.lib
  171.  
  172. guilibsdll = crtdll.lib ntdll.lib kernel32.lib user32.lib gdi32.lib \
  173.              winspool.lib comdlg32.lib
  174.  
  175. psxlibs    = libcpsx.lib ntdll.lib kernel32.lib psxdll.lib psxrtl.lib
  176.